feat(terminal): unify xterm client and harden transport - #5038
Open
ErickCReis wants to merge 11 commits into
Open
ErickCReis wants to merge 11 commits into
ErickCReis wants to merge 11 commits into
Conversation
- Share reusable xterm setup across terminal views - Resize local and remote PTYs with validated dimensions - Add terminal search, links, Unicode, and clipboard support
- Validate terminal dimensions strictly - Normalize WebSocket errors safely - Simplify terminal query and search focus handling
…minal-ux # Conflicts: # apps/dokploy/components/dashboard/docker/logs/docker-logs-id.tsx # apps/dokploy/components/dashboard/docker/terminal/docker-terminal.tsx # apps/dokploy/components/dashboard/settings/web-server/terminal.tsx # apps/dokploy/server/wss/docker-container-terminal.ts # apps/dokploy/server/wss/terminal.ts
ErickCReis
marked this pull request as ready for review
August 18, 2026 00:23
Destroy pending SSH clients when the terminal WebSocket closes and reject channels created after disconnect.
ErickCReis
force-pushed
the
feature/improve-terminal-ux
branch
from
August 29, 2026 14:23
4fbd00a to
959790f
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
This PR builds on #5104. That PR synchronizes browser dimensions with Docker and SSH PTYs and fixes the overwrite reported in #5092. This PR keeps that behavior and adds the remaining terminal transport, lifecycle, and client improvements.
fit()runs.Why
#5104 fixes the visible PTY-size desynchronization, but its transport still decodes binary WebSocket input as UTF-8 text. Mouse reports and non-ASCII bytes can change before they reach the PTY. Its resize controls also share text frames with stdin.
This PR gives stdin and resize controls distinct frame types. It also centralizes behavior that was duplicated between the server and Docker terminal clients. Both terminals now use the same resizing, cleanup, theme, search, Unicode, link, keyboard, and clipboard code.
Related work
Validation
The final checks ran with Node 24.4.0 and pnpm 10.22.0 after merging the latest
canaryand pushing the StrictMode lifecycle fix.corepack pnpm --filter=dokploy exec vitest --config __test__/vitest.config.ts __test__/wss/utils.test.ts __test__/wss/terminal-transport.test.ts --runpassed 33 tests.corepack pnpm --filter=dokploy run typecheckpassed.corepack pnpm --filter=dokploy run buildpassed. The build logged the expected missing localdokploy-postgresand deprecated local configuration warnings.git diff --checkpassed.Checklist
canaryand includes the latest changes from it.Tooling disclosure
This contribution was built and validated with Codex.
Greptile Summary
This PR consolidates server and container terminals around a shared xterm client and hardens terminal transport and lifecycle behavior.
Confidence Score: 5/5
The PR appears safe to merge because no blocking failure remains in the eligible follow-up review scope.
No blocking failure remains.
Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/can..." | Re-trigger Greptile
Context used:
Follow-up fix